package com.xingfly.model;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

/**
 * 事件和用户的关系
 * Created by SuperS on 2016/12/7.
 */
@Entity
@Table(name = "xf_event_user")
public class EventUser  extends BaseModel{
    @OneToOne
    @JoinColumn(name = "event_id")
    private Event event;

    @OneToOne
    @JoinColumn(name = "following_id")
    private User following;//关注者

    @OneToOne
    @JoinColumn(name = "follower_id")
    private User follower;//追随者 粉丝

    private boolean isLike;

    public Event getEvent() {
        return event;
    }

    public void setEvent(Event event) {
        this.event = event;
    }

    public User getFollowing() {
        return following;
    }

    public void setFollowing(User following) {
        this.following = following;
    }

    public User getFollower() {
        return follower;
    }

    public void setFollower(User follower) {
        this.follower = follower;
    }

    public boolean isLike() {
        return isLike;
    }

    public void setLike(boolean like) {
        isLike = like;
    }
}
